package com.qfedu.controller;

import com.qfedu.entity.ResultVo;
import com.qfedu.entity.UserHobby;
import com.qfedu.service.UserHobbyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 作者：刘随阳
 * 时间: 2021/9/25 15:48
 * 描述：神光照耀,太白成瑞。六丙来迎,百福悠归
 */
@RestController
@RequestMapping("cf")
public class RecommendController {
    @Autowired
    private UserHobbyService userHobbyService;
    @PostMapping("updateUserHobby")
    public ResultVo updateUserHobby(@RequestBody UserHobby userHobby){
        return userHobbyService.updateUserHobby(userHobby);
    }
    @GetMapping("getByUserCF")
    public ResultVo getByUserCF(@RequestHeader("token") String token){
        return userHobbyService.getByUserCF(token);
    }

    @GetMapping("getByItemCF")
    public ResultVo getByItemCF(@RequestHeader("token") String token){
        return userHobbyService.getByItemCF(token);
    }
}
